home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_apache2.idb / usr / freeware / apache2 / conf / httpd.conf.z / httpd.conf
Text File  |  2002-07-08  |  34KB  |  1,026 lines

  1. #
  2. # Based upon the NCSA server configuration files originally by Rob McCool.
  3. #
  4. # This is the main Apache server configuration file.  It contains the
  5. # configuration directives that give the server its instructions.
  6. # See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
  7. # the directives.
  8. #
  9. # Do NOT simply read the instructions in here without understanding
  10. # what they do.  They're here only as hints or reminders.  If you are unsure
  11. # consult the online docs. You have been warned.  
  12. #
  13. # The configuration directives are grouped into three basic sections:
  14. #  1. Directives that control the operation of the Apache server process as a
  15. #     whole (the 'global environment').
  16. #  2. Directives that define the parameters of the 'main' or 'default' server,
  17. #     which responds to requests that aren't handled by a virtual host.
  18. #     These directives also provide default values for the settings
  19. #     of all virtual hosts.
  20. #  3. Settings for virtual hosts, which allow Web requests to be sent to
  21. #     different IP addresses or hostnames and have them handled by the
  22. #     same Apache server process.
  23. #
  24. # Configuration and logfile names: If the filenames you specify for many
  25. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  26. # server will use that explicit path.  If the filenames do *not* begin
  27. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  28. # with ServerRoot set to "/usr/freeware/apache2" will be interpreted by the
  29. # server as "/usr/freeware/apache2/logs/foo.log".
  30. #
  31.  
  32. ### Section 1: Global Environment
  33. #
  34. # The directives in this section affect the overall operation of Apache,
  35. # such as the number of concurrent requests it can handle or where it
  36. # can find its configuration files.
  37. #
  38.  
  39. #
  40. # ServerRoot: The top of the directory tree under which the server's
  41. # configuration, error, and log files are kept.
  42. #
  43. # NOTE!  If you intend to place this on an NFS (or otherwise network)
  44. # mounted filesystem then please read the LockFile documentation
  45. # (available at <URL:http://httpd.apache.org/docs-2.0/mod/core.html#lockfile>);
  46. # you will save yourself a lot of trouble.
  47. #
  48. # Do NOT add a slash at the end of the directory path.
  49. #
  50. ServerRoot "/usr/freeware/apache2"
  51.  
  52. #
  53. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  54. #
  55. <IfModule !mpm_winnt.c>
  56. <IfModule !mpm_netware.c>
  57. #LockFile logs/accept.lock
  58. </IfModule>
  59. </IfModule>
  60.  
  61. #
  62. # ScoreBoardFile: File used to store internal server process information.
  63. # If unspecified (the default), the scoreboard will be stored in an
  64. # anonymous shared memory segment, and will be unavailable to third-party
  65. # applications.
  66. # If specified, ensure that no two invocations of Apache share the same
  67. # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
  68. #
  69. <IfModule !mpm_netware.c>
  70. <IfModule !perchild.c>
  71. #ScoreBoardFile logs/apache_runtime_status
  72. </IfModule>
  73. </IfModule>
  74.  
  75.  
  76. #
  77. # PidFile: The file in which the server should record its process
  78. # identification number when it starts.
  79. #
  80. <IfModule !mpm_netware.c>
  81. PidFile logs/httpd.pid
  82. </IfModule>
  83.  
  84. #
  85. # Timeout: The number of seconds before receives and sends time out.
  86. #
  87. Timeout 300
  88.  
  89. #
  90. # KeepAlive: Whether or not to allow persistent connections (more than
  91. # one request per connection). Set to "Off" to deactivate.
  92. #
  93. KeepAlive On
  94.  
  95. #
  96. # MaxKeepAliveRequests: The maximum number of requests to allow
  97. # during a persistent connection. Set to 0 to allow an unlimited amount.
  98. # We recommend you leave this number high, for maximum performance.
  99. #
  100. MaxKeepAliveRequests 100
  101.  
  102. #
  103. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  104. # same client on the same connection.
  105. #
  106. KeepAliveTimeout 15
  107.  
  108. ##
  109. ## Server-Pool Size Regulation (MPM specific)
  110. ## 
  111.  
  112. # prefork MPM
  113. # StartServers: number of server processes to start
  114. # MinSpareServers: minimum number of server processes which are kept spare
  115. # MaxSpareServers: maximum number of server processes which are kept spare
  116. # MaxClients: maximum number of server processes allowed to start
  117. # MaxRequestsPerChild: maximum number of requests a server process serves
  118. <IfModule prefork.c>
  119. StartServers         5
  120. MinSpareServers      5
  121. MaxSpareServers     10
  122. MaxClients         150
  123. MaxRequestsPerChild  0
  124. </IfModule>
  125.  
  126. # worker MPM
  127. # StartServers: initial number of server processes to start
  128. # MaxClients: maximum number of simultaneous client connections
  129. # MinSpareThreads: minimum number of worker threads which are kept spare
  130. # MaxSpareThreads: maximum number of worker threads which are kept spare
  131. # ThreadsPerChild: constant number of worker threads in each server process
  132. # MaxRequestsPerChild: maximum number of requests a server process serves
  133. <IfModule worker.c>
  134. StartServers         2
  135. MaxClients         150
  136. MinSpareThreads     25
  137. MaxSpareThreads     75 
  138. ThreadsPerChild     25
  139. MaxRequestsPerChild  0
  140. </IfModule>
  141.  
  142. # perchild MPM
  143. # NumServers: constant number of server processes
  144. # StartThreads: initial number of worker threads in each server process
  145. # MinSpareThreads: minimum number of worker threads which are kept spare
  146. # MaxSpareThreads: maximum number of worker threads which are kept spare
  147. # MaxThreadsPerChild: maximum number of worker threads in each server process
  148. # MaxRequestsPerChild: maximum number of connections per server process
  149. <IfModule perchild.c>
  150. NumServers           5
  151. StartThreads         5
  152. MinSpareThreads      5
  153. MaxSpareThreads     10
  154. MaxThreadsPerChild  20
  155. MaxRequestsPerChild  0
  156. </IfModule>
  157.  
  158. # WinNT MPM
  159. # ThreadsPerChild: constant number of worker threads in the server process
  160. # MaxRequestsPerChild: maximum  number of requests a server process serves
  161. <IfModule mpm_winnt.c>
  162. ThreadsPerChild 250
  163. MaxRequestsPerChild  0
  164. </IfModule>
  165.  
  166. # BeOS MPM
  167. # StartThreads: how many threads do we initially spawn?
  168. # MaxClients:   max number of threads we can have (1 thread == 1 client)
  169. # MaxRequestsPerThread: maximum number of requests each thread will process
  170. <IfModule beos.c>
  171. StartThreads               10
  172. MaxClients                 50
  173. MaxRequestsPerThread       10000
  174. </IfModule>    
  175.  
  176. # NetWare MPM
  177. # ThreadStackSize ...... Stack size allocated for each worker thread
  178. # StartThreads ......... Number of worker threads launched at server startup
  179. # MinSpareThreads ...... Minimum number of idle threads, to handle request spikes
  180. # MaxSpareThreads ...... Maximum number of idle threads
  181. # MaxThreads ........... Maximum number of worker threads alive at the same time
  182. # MaxRequestsPerChild .. Maximum  number of requests a thread serves. It is 
  183. #                         recommended that the default value of 0 be set for this
  184. #                         directive on NetWare.  This will allow the thread to 
  185. #                         continue to service requests indefinitely.                          
  186. <IfModule mpm_netware.c>
  187. ThreadStackSize      65536
  188. StartThreads           250
  189. MinSpareThreads         25
  190. MaxSpareThreads        250
  191. MaxThreads            1000
  192. MaxRequestsPerChild      0
  193. </IfModule>
  194.  
  195. # OS/2 MPM
  196. # StartServers ......... Number of server processes to maintain
  197. # MinSpareThreads ...... Minimum number of idle threads per process, 
  198. #                         to handle request spikes
  199. # MaxSpareThreads ...... Maximum number of idle threads per process
  200. # MaxRequestsPerChild .. Maximum number of connections per server process
  201. <IfModule mpmt_os2.c>
  202. StartServers           2
  203. MinSpareThreads        5
  204. MaxSpareThreads       10
  205. MaxRequestsPerChild    0
  206. </IfModule>
  207.  
  208. #
  209. # Listen: Allows you to bind Apache to specific IP addresses and/or
  210. # ports, in addition to the default. See also the <VirtualHost>
  211. # directive.
  212. #
  213. # Change this to Listen on specific IP addresses as shown below to 
  214. # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
  215. #
  216. #Listen 12.34.56.78:80
  217. Listen 8080
  218.  
  219. #
  220. # Dynamic Shared Object (DSO) Support
  221. #
  222. # To be able to use the functionality of a module which was built as a DSO you
  223. # have to place corresponding `LoadModule' lines at this location so the
  224. # directives contained in it are actually available _before_ they are used.
  225. # Statically compiled modules (those listed by `httpd -l') do not need
  226. # to be loaded here.
  227. #
  228. # Example:
  229. # LoadModule deflate_module modules/mod_deflate.so
  230. #
  231.  
  232. #
  233. # ExtendedStatus controls whether Apache will generate "full" status
  234. # information (ExtendedStatus On) or just basic information (ExtendedStatus
  235. # Off) when the "server-status" handler is called. The default is Off.
  236. #
  237. #ExtendedStatus On
  238.  
  239. ### Section 2: 'Main' server configuration
  240. #
  241. # The directives in this section set up the values used by the 'main'
  242. # server, which responds to any requests that aren't handled by a
  243. # <VirtualHost> definition.  These values also provide defaults for
  244. # any <VirtualHost> containers you may define later in the file.
  245. #
  246. # All of these directives may appear inside <VirtualHost> containers,
  247. # in which case these default settings will be overridden for the
  248. # virtual host being defined.
  249. #
  250.  
  251. <IfModule !mpm_winnt.c>
  252. <IfModule !mpm_netware.c>
  253. #
  254. # If you wish httpd to run as a different user or group, you must run
  255. # httpd as root initially and it will switch.  
  256. #
  257. # User/Group: The name (or #number) of the user/group to run httpd as.
  258. #  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
  259. #  . On HPUX you may not be able to use shared memory as nobody, and the
  260. #    suggested workaround is to create a user www and use that user.
  261. #  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
  262. #  when the value of (unsigned)Group is above 60000; 
  263. #  don't use Group #-1 on these systems!
  264. #
  265. User nobody
  266. Group nobody
  267. </IfModule>
  268. </IfModule>
  269.  
  270. #
  271. # ServerAdmin: Your address, where problems with the server should be
  272. # e-mailed.  This address appears on some server-generated pages, such
  273. # as error documents.  e.g. admin@your-domain.com
  274. #
  275. #ServerAdmin you@your.address
  276.  
  277. #
  278. # ServerName gives the name and port that the server uses to identify itself.
  279. # This can often be determined automatically, but we recommend you specify
  280. # it explicitly to prevent problems during startup.
  281. #
  282. # If this is not set to valid DNS name for your host, server-generated
  283. # redirections will not work.  See also the UseCanonicalName directive.
  284. #
  285. # If your host doesn't have a registered DNS name, enter its IP address here.
  286. # You will have to access it by its address anyway, and this will make 
  287. # redirections work in a sensible way.
  288. #
  289. #ServerName new.host.name:80
  290.  
  291. #
  292. # UseCanonicalName: Determines how Apache constructs self-referencing 
  293. # URLs and the SERVER_NAME and SERVER_PORT variables.
  294. # When set "Off", Apache will use the Hostname and Port supplied
  295. # by the client.  When set "On", Apache will use the value of the
  296. # ServerName directive.
  297. #
  298. UseCanonicalName Off
  299.  
  300. #
  301. # DocumentRoot: The directory out of which you will serve your
  302. # documents. By default, all requests are taken from this directory, but
  303. # symbolic links and aliases may be used to point to other locations.
  304. #
  305. DocumentRoot "/usr/freeware/apache2/htdocs"
  306.  
  307. #
  308. # Each directory to which Apache has access can be configured with respect
  309. # to which services and features are allowed and/or disabled in that
  310. # directory (and its subdirectories). 
  311. #
  312. # First, we configure the "default" to be a very restrictive set of 
  313. # features.  
  314. #
  315. <Directory />
  316.     Options FollowSymLinks
  317.     AllowOverride None
  318. </Directory>
  319.  
  320. #
  321. # Note that from this point forward you must specifically allow
  322. # particular features to be enabled - so if something's not working as
  323. # you might expect, make sure that you have specifically enabled it
  324. # below.
  325. #
  326.  
  327. #
  328. # This should be changed to whatever you set DocumentRoot to.
  329. #
  330. <Directory "/usr/freeware/apache2/htdocs">
  331.  
  332. #
  333. # Possible values for the Options directive are "None", "All",
  334. # or any combination of:
  335. #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
  336. #
  337. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  338. # doesn't give it to you.
  339. #
  340. # The Options directive is both complicated and important.  Please see
  341. # http://httpd.apache.org/docs-2.0/mod/core.html#options
  342. # for more information.
  343. #
  344.     Options Indexes FollowSymLinks
  345.  
  346. #
  347. # AllowOverride controls what directives may be placed in .htaccess files.
  348. # It can be "All", "None", or any combination of the keywords:
  349. #   Options FileInfo AuthConfig Limit
  350. #
  351.     AllowOverride None
  352.  
  353. #
  354. # Controls who can get stuff from this server.
  355. #
  356.     Order allow,deny
  357.     Allow from all
  358.  
  359. </Directory>
  360.  
  361. #
  362. # UserDir: The name of the directory that is appended onto a user's home
  363. # directory if a ~user request is received.
  364. #
  365. UserDir public_html
  366.  
  367. #
  368. # Control access to UserDir directories.  The following is an example
  369. # for a site where these directories are restricted to read-only.
  370. #
  371. #<Directory /home/*/public_html>
  372. #    AllowOverride FileInfo AuthConfig Limit
  373. #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  374. #    <Limit GET POST OPTIONS PROPFIND>
  375. #        Order allow,deny
  376. #        Allow from all
  377. #    </Limit>
  378. #    <LimitExcept GET POST OPTIONS PROPFIND>
  379. #        Order deny,allow
  380. #        Deny from all
  381. #    </LimitExcept>
  382. #</Directory>
  383.  
  384. #
  385. # DirectoryIndex: sets the file that Apache will serve if a directory
  386. # is requested.
  387. #
  388. # The index.html.var file (a type-map) is used to deliver content-
  389. # negotiated documents.  The MultiViews Option can be used for the 
  390. # same purpose, but it is much slower.
  391. #
  392. DirectoryIndex index.html index.html.var
  393.  
  394. #
  395. # AccessFileName: The name of the file to look for in each directory
  396. # for access control information.  See also the AllowOverride directive.
  397. #
  398. AccessFileName .htaccess
  399.  
  400. #
  401. # The following lines prevent .htaccess and .htpasswd files from being 
  402. # viewed by Web clients. 
  403. #
  404. <Files ~ "^\.ht">
  405.     Order allow,deny
  406.     Deny from all
  407. </Files>
  408.  
  409. #
  410. # TypesConfig describes where the mime.types file (or equivalent) is
  411. # to be found.
  412. #
  413. TypesConfig conf/mime.types
  414.  
  415. #
  416. # DefaultType is the default MIME type the server will use for a document
  417. # if it cannot otherwise determine one, such as from filename extensions.
  418. # If your server contains mostly text or HTML documents, "text/plain" is
  419. # a good value.  If most of your content is binary, such as applications
  420. # or images, you may want to use "application/octet-stream" instead to
  421. # keep browsers from trying to display binary files as though they are
  422. # text.
  423. #
  424. DefaultType text/plain
  425.  
  426. #
  427. # The mod_mime_magic module allows the server to use various hints from the
  428. # contents of the file itself to determine its type.  The MIMEMagicFile
  429. # directive tells the module where the hint definitions are located.
  430. #
  431. <IfModule mod_mime_magic.c>
  432.     MIMEMagicFile conf/magic
  433. </IfModule>
  434.  
  435. #
  436. # HostnameLookups: Log the names of clients or just their IP addresses
  437. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  438. # The default is off because it'd be overall better for the net if people
  439. # had to knowingly turn this feature on, since enabling it means that
  440. # each client request will result in AT LEAST one lookup request to the
  441. # nameserver.
  442. #
  443. HostnameLookups Off
  444.  
  445. #
  446. # ErrorLog: The location of the error log file.
  447. # If you do not specify an ErrorLog directive within a <VirtualHost>
  448. # container, error messages relating to that virtual host will be
  449. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  450. # container, that host's errors will be logged there and not here.
  451. #
  452. ErrorLog logs/error_log
  453.  
  454. #
  455. # LogLevel: Control the number of messages logged to the error_log.
  456. # Possible values include: debug, info, notice, warn, error, crit,
  457. # alert, emerg.
  458. #
  459. LogLevel warn
  460.  
  461. #
  462. # The following directives define some format nicknames for use with
  463. # a CustomLog directive (see below).
  464. #
  465. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  466. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  467. LogFormat "%{Referer}i -> %U" referer
  468. LogFormat "%{User-agent}i" agent
  469.  
  470. #
  471. # The location and format of the access logfile (Common Logfile Format).
  472. # If you do not define any access logfiles within a <VirtualHost>
  473. # container, they will be logged here.  Contrariwise, if you *do*
  474. # define per-<VirtualHost> access logfiles, transactions will be
  475. # logged therein and *not* in this file.
  476. #
  477. CustomLog logs/access_log common
  478.  
  479. #
  480. # If you would like to have agent and referer logfiles, uncomment the
  481. # following directives.
  482. #
  483. #CustomLog logs/referer_log referer
  484. #CustomLog logs/agent_log agent
  485.  
  486. #
  487. # If you prefer a single logfile with access, agent, and referer information
  488. # (Combined Logfile Format) you can use the following directive.
  489. #
  490. #CustomLog logs/access_log combined
  491.  
  492. #
  493. # Optionally add a line containing the server version and virtual host
  494. # name to server-generated pages (error documents, FTP directory listings,
  495. # mod_status and mod_info output etc., but not CGI generated documents).
  496. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  497. # Set to one of:  On | Off | EMail
  498. #
  499. ServerSignature On
  500.  
  501. #
  502. # Aliases: Add here as many aliases as you need (with no limit). The format is 
  503. # Alias fakename realname
  504. #
  505. # Note that if you include a trailing / on fakename then the server will
  506. # require it to be present in the URL.  So "/icons" isn't aliased in this
  507. # example, only "/icons/".  If the fakename is slash-terminated, then the 
  508. # realname must also be slash terminated, and if the fakename omits the 
  509. # trailing slash, the realname must also omit it.
  510. #
  511. # We include the /icons/ alias for FancyIndexed directory listings.  If you
  512. # do not use FancyIndexing, you may comment this out.
  513. #
  514. Alias /icons/ "/usr/freeware/apache2/icons/"
  515.  
  516. <Directory "/usr/freeware/apache2/icons">
  517.     Options Indexes MultiViews
  518.     AllowOverride None
  519.     Order allow,deny
  520.     Allow from all
  521. </Directory>
  522.  
  523. #
  524. # This should be changed to the ServerRoot/manual/.  The alias provides
  525. # the manual, even if you choose to move your DocumentRoot.  You may comment
  526. # this out if you do not care for the documentation.
  527. #
  528. Alias /manual "/usr/freeware/apache2/manual"
  529.  
  530. <Directory "/usr/freeware/apache2/manual">
  531.     Options Indexes FollowSymLinks MultiViews
  532.     AllowOverride None
  533.     Order allow,deny
  534.     Allow from all
  535. </Directory>
  536.  
  537. #
  538. # ScriptAlias: This controls which directories contain server scripts.
  539. # ScriptAliases are essentially the same as Aliases, except that
  540. # documents in the realname directory are treated as applications and
  541. # run by the server when requested rather than as documents sent to the client.
  542. # The same rules about trailing "/" apply to ScriptAlias directives as to
  543. # Alias.
  544. #
  545. ScriptAlias /cgi-bin/ "/usr/freeware/apache2/cgi-bin/"
  546.  
  547. <IfModule mod_cgid.c>
  548. #
  549. # Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
  550. # for setting UNIX socket for communicating with cgid.
  551. #
  552. #Scriptsock            logs/cgisock
  553. </IfModule>
  554.  
  555. #
  556. # "/usr/freeware/apache2/cgi-bin" should be changed to whatever your ScriptAliased
  557. # CGI directory exists, if you have that configured.
  558. #
  559. <Directory "/usr/freeware/apache2/cgi-bin">
  560.     AllowOverride None
  561.     Options None
  562.     Order allow,deny
  563.     Allow from all
  564. </Directory>
  565.  
  566. #
  567. # Redirect allows you to tell clients about documents which used to exist in
  568. # your server's namespace, but do not anymore. This allows you to tell the
  569. # clients where to look for the relocated document.
  570. # Example:
  571. # Redirect permanent /foo http://www.example.com/bar
  572.  
  573. #
  574. # Directives controlling the display of server-generated directory listings.
  575. #
  576.  
  577. #
  578. # FancyIndexing is whether you want fancy directory indexing or standard.
  579. # VersionSort is whether files containing version numbers should be 
  580. # compared in the natural way, so that `apache-1.3.9.tar' is placed before
  581. # `apache-1.3.12.tar'.
  582. #
  583. IndexOptions FancyIndexing VersionSort
  584.  
  585. #
  586. # AddIcon* directives tell the server which icon to show for different
  587. # files or filename extensions.  These are only displayed for
  588. # FancyIndexed directories.
  589. #
  590. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  591.  
  592. AddIconByType (TXT,/icons/text.gif) text/*
  593. AddIconByType (IMG,/icons/image2.gif) image/*
  594. AddIconByType (SND,/icons/sound2.gif) audio/*
  595. AddIconByType (VID,/icons/movie.gif) video/*
  596.  
  597. AddIcon /icons/binary.gif .bin .exe
  598. AddIcon /icons/binhex.gif .hqx
  599. AddIcon /icons/tar.gif .tar
  600. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  601. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  602. AddIcon /icons/a.gif .ps .ai .eps
  603. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  604. AddIcon /icons/text.gif .txt
  605. AddIcon /icons/c.gif .c
  606. AddIcon /icons/p.gif .pl .py
  607. AddIcon /icons/f.gif .for
  608. AddIcon /icons/dvi.gif .dvi
  609. AddIcon /icons/uuencoded.gif .uu
  610. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  611. AddIcon /icons/tex.gif .tex
  612. AddIcon /icons/bomb.gif core
  613.  
  614. AddIcon /icons/back.gif ..
  615. AddIcon /icons/hand.right.gif README
  616. AddIcon /icons/folder.gif ^^DIRECTORY^^
  617. AddIcon /icons/blank.gif ^^BLANKICON^^
  618.  
  619. #
  620. # DefaultIcon is which icon to show for files which do not have an icon
  621. # explicitly set.
  622. #
  623. DefaultIcon /icons/unknown.gif
  624.  
  625. #
  626. # AddDescription allows you to place a short description after a file in
  627. # server-generated indexes.  These are only displayed for FancyIndexed
  628. # directories.
  629. # Format: AddDescription "description" filename
  630. #
  631. #AddDescription "GZIP compressed document" .gz
  632. #AddDescription "tar archive" .tar
  633. #AddDescription "GZIP compressed tar archive" .tgz
  634.  
  635. #
  636. # ReadmeName is the name of the README file the server will look for by
  637. # default, and append to directory listings.
  638. #
  639. # HeaderName is the name of a file which should be prepended to
  640. # directory indexes. 
  641. ReadmeName README.html
  642. HeaderName HEADER.html
  643.  
  644. #
  645. # IndexIgnore is a set of filenames which directory indexing should ignore
  646. # and not include in the listing.  Shell-style wildcarding is permitted.
  647. #
  648. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  649.  
  650. #
  651. # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
  652. # information on the fly. Note: Not all browsers support this.
  653. # Despite the name similarity, the following Add* directives have nothing
  654. # to do with the FancyIndexing customization directives above.
  655. #
  656. AddEncoding x-compress Z
  657. AddEncoding x-gzip gz tgz
  658.  
  659. #
  660. # DefaultLanguage and AddLanguage allows you to specify the language of 
  661. # a document. You can then use content negotiation to give a browser a 
  662. # file in a language the user can understand.
  663. #
  664. # Specify a default language. This means that all data
  665. # going out without a specific language tag (see below) will 
  666. # be marked with this one. You probably do NOT want to set
  667. # this unless you are sure it is correct for all cases.
  668. #
  669. # * It is generally better to not mark a page as 
  670. # * being a certain language than marking it with the wrong
  671. # * language!
  672. #
  673. # DefaultLanguage nl
  674. #
  675. # Note 1: The suffix does not have to be the same as the language
  676. # keyword --- those with documents in Polish (whose net-standard
  677. # language code is pl) may wish to use "AddLanguage pl .po" to
  678. # avoid the ambiguity with the common suffix for perl scripts.
  679. #
  680. # Note 2: The example entries below illustrate that in some cases 
  681. # the two character 'Language' abbreviation is not identical to 
  682. # the two character 'Country' code for its country,
  683. # E.g. 'Danmark/dk' versus 'Danish/da'.
  684. #
  685. # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  686. # specifier. There is 'work in progress' to fix this and get
  687. # the reference data for rfc1766 cleaned up.
  688. #
  689. # Danish (da) - Dutch (nl) - English (en) - Estonian (et)
  690. # French (fr) - German (de) - Greek-Modern (el)
  691. # Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (kr) 
  692. # Portugese (pt) - Luxembourgeois* (ltz)
  693. # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
  694. # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
  695. # Russian (ru) - Croatian (hr)
  696. #
  697. AddLanguage da .dk
  698. AddLanguage nl .nl
  699. AddLanguage en .en
  700. AddLanguage et .et
  701. AddLanguage fr .fr
  702. AddLanguage de .de
  703. AddLanguage he .he
  704. AddLanguage el .el
  705. AddLanguage it .it
  706. AddLanguage ja .ja
  707. AddLanguage pl .po
  708. AddLanguage kr .kr
  709. AddLanguage pt .pt
  710. AddLanguage nn .nn
  711. AddLanguage no .no
  712. AddLanguage pt-br .pt-br
  713. AddLanguage ltz .ltz
  714. AddLanguage ca .ca
  715. AddLanguage es .es
  716. AddLanguage sv .se
  717. AddLanguage cz .cz
  718. AddLanguage ru .ru
  719. AddLanguage tw .tw
  720. AddLanguage zh-tw .tw
  721. AddLanguage hr .hr
  722.  
  723. #
  724. # LanguagePriority allows you to give precedence to some languages
  725. # in case of a tie during content negotiation.
  726. #
  727. # Just list the languages in decreasing order of preference. We have
  728. # more or less alphabetized them here. You probably want to change this.
  729. #
  730. LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv tw
  731.  
  732. #
  733. # ForceLanguagePriority allows you to serve a result page rather than
  734. # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
  735. # [in case no accepted languages matched the available variants]
  736. #
  737. ForceLanguagePriority Prefer Fallback
  738.  
  739. #
  740. # Specify a default charset for all pages sent out. This is
  741. # always a good idea and opens the door for future internationalisation
  742. # of your web site, should you ever want it. Specifying it as
  743. # a default does little harm; as the standard dictates that a page
  744. # is in iso-8859-1 (latin1) unless specified otherwise i.e. you
  745. # are merely stating the obvious. There are also some security
  746. # reasons in browsers, related to javascript and URL parsing
  747. # which encourage you to always set a default char set.
  748. #
  749. AddDefaultCharset ISO-8859-1
  750.  
  751. #
  752. # Commonly used filename extensions to character sets. You probably
  753. # want to avoid clashes with the language extensions, unless you
  754. # are good at carefully testing your setup after each change.
  755. # See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets for
  756. # the official list of charset names and their respective RFCs
  757. #
  758. AddCharset ISO-8859-1  .iso8859-1  .latin1
  759. AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
  760. AddCharset ISO-8859-3  .iso8859-3  .latin3
  761. AddCharset ISO-8859-4  .iso8859-4  .latin4
  762. AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
  763. AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
  764. AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
  765. AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
  766. AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
  767. AddCharset ISO-2022-JP .iso2022-jp .jis
  768. AddCharset ISO-2022-KR .iso2022-kr .kis
  769. AddCharset ISO-2022-CN .iso2022-cn .cis
  770. AddCharset Big5        .Big5       .big5
  771. # For russian, more than one charset is used (depends on client, mostly):
  772. AddCharset WINDOWS-1251 .cp-1251   .win-1251
  773. AddCharset CP866       .cp866
  774. AddCharset KOI8-r      .koi8-r .koi8-ru
  775. AddCharset KOI8-ru     .koi8-uk .ua
  776. AddCharset ISO-10646-UCS-2 .ucs2
  777. AddCharset ISO-10646-UCS-4 .ucs4
  778. AddCharset UTF-8       .utf8
  779.  
  780. # The set below does not map to a specific (iso) standard
  781. # but works on a fairly wide range of browsers. Note that
  782. # capitalization actually matters (it should not, but it
  783. # does for some browsers).
  784. #
  785. # See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets
  786. # for a list of sorts. But browsers support few.
  787. #
  788. AddCharset GB2312      .gb2312 .gb 
  789. AddCharset utf-7       .utf7
  790. AddCharset utf-8       .utf8
  791. AddCharset big5        .big5 .b5
  792. AddCharset EUC-TW      .euc-tw
  793. AddCharset EUC-JP      .euc-jp
  794. AddCharset EUC-KR      .euc-kr
  795. AddCharset shift_jis   .sjis
  796.  
  797. #
  798. # AddType allows you to add to or override the MIME configuration
  799. # file mime.types for specific file types.
  800. #
  801. AddType application/x-tar .tgz
  802.  
  803. #
  804. # AddHandler allows you to map certain file extensions to "handlers":
  805. # actions unrelated to filetype. These can be either built into the server
  806. # or added with the Action directive (see below)
  807. #
  808. # To use CGI scripts outside of ScriptAliased directories:
  809. # (You will also need to add "ExecCGI" to the "Options" directive.)
  810. #
  811. #AddHandler cgi-script .cgi
  812.  
  813. #
  814. # For files that include their own HTTP headers:
  815. #
  816. #AddHandler send-as-is asis
  817.  
  818. #
  819. # For server-parsed imagemap files:
  820. #
  821. #AddHandler imap-file map
  822.  
  823. #
  824. # For type maps (negotiated resources):
  825. # (This is enabled by default to allow the Apache "It Worked" page
  826. #  to be distributed in multiple languages.)
  827. #
  828. AddHandler type-map var
  829.  
  830. # Filters allow you to process content before it is sent to the client.
  831. #
  832. # To parse .shtml files for server-side includes (SSI):
  833. # (You will also need to add "Includes" to the "Options" directive.)
  834. #
  835. #AddOutputFilter INCLUDES .shtml
  836.  
  837. #
  838. # Action lets you define media types that will execute a script whenever
  839. # a matching file is called. This eliminates the need for repeated URL
  840. # pathnames for oft-used CGI file processors.
  841. # Format: Action media/type /cgi-script/location
  842. # Format: Action handler-name /cgi-script/location
  843. #
  844.  
  845. #
  846. # Customizable error responses come in three flavors:
  847. # 1) plain text 2) local redirects 3) external redirects
  848. #
  849. # Some examples:
  850. #ErrorDocument 500 "The server made a boo boo."
  851. #ErrorDocument 404 /missing.html
  852. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  853. #ErrorDocument 402 http://www.example.com/subscription_info.html
  854. #
  855.  
  856. #
  857. # Putting this all together, we can Internationalize error responses.
  858. #
  859. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  860. # our collection of by-error message multi-language collections.  We use 
  861. # includes to substitute the appropriate text.
  862. #
  863. # You can modify the messages' appearance without changing any of the
  864. # default HTTP_<error>.html.var files by adding the line;
  865. #
  866. #   Alias /error/include/ "/your/include/path/"
  867. #
  868. # which allows you to create your own set of files by starting with the
  869. # /usr/freeware/apache2/error/include/ files and
  870. # copying them to /your/include/path/, even on a per-VirtualHost basis.
  871. #
  872.  
  873. <IfModule mod_negotiation.c>
  874. <IfModule mod_include.c>
  875.     Alias /error/ "/usr/freeware/apache2/error/"
  876.  
  877.     <Directory "/usr/freeware/apache2/error">
  878.         AllowOverride None
  879.         Options IncludesNoExec
  880.         AddOutputFilter Includes html
  881.         AddHandler type-map var
  882.         Order allow,deny
  883.         Allow from all
  884.         LanguagePriority en es de fr
  885.         ForceLanguagePriority Prefer Fallback
  886.     </Directory>
  887.  
  888.     ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  889.     ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  890.     ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  891.     ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  892.     ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  893.     ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  894.     ErrorDocument 410 /error/HTTP_GONE.html.var
  895.     ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  896.     ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  897.     ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  898.     ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  899.     ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  900.     ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  901.     ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  902.     ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  903.     ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  904.     ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  905.  
  906. </IfModule>
  907. </IfModule>
  908.  
  909. #
  910. # The following directives modify normal HTTP response behavior to
  911. # handle known problems with browser implementations.
  912. #
  913. BrowserMatch "Mozilla/2" nokeepalive
  914. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  915. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  916. BrowserMatch "Java/1\.0" force-response-1.0
  917. BrowserMatch "JDK/1\.0" force-response-1.0
  918.  
  919. #
  920. # The following directive disables redirects on non-GET requests for
  921. # a directory that does not include the trailing slash.  This fixes a 
  922. # problem with Microsoft WebFolders which does not appropriately handle 
  923. # redirects for folders with DAV methods.
  924. #
  925. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  926. BrowserMatch "^WebDrive" redirect-carefully
  927.  
  928. #
  929. # Allow server status reports, with the URL of http://servername/server-status
  930. # Change the ".your-domain.com" to match your domain to enable.
  931. #
  932. #<Location /server-status>
  933. #    SetHandler server-status
  934. #    Order deny,allow
  935. #    Deny from all
  936. #    Allow from .your-domain.com
  937. #</Location>
  938.  
  939. #
  940. # Allow remote server configuration reports, with the URL of
  941. #  http://servername/server-info (requires that mod_info.c be loaded).
  942. # Change the ".your-domain.com" to match your domain to enable.
  943. #
  944. #<Location /server-info>
  945. #    SetHandler server-info
  946. #    Order deny,allow
  947. #    Deny from all
  948. #    Allow from .your-domain.com
  949. #</Location>
  950.  
  951. #
  952. # Proxy Server directives. Uncomment the following lines to
  953. # enable the proxy server:
  954. #
  955. #<IfModule mod_proxy.c>
  956. #ProxyRequests On
  957. #
  958. #<Proxy *>
  959. #    Order deny,allow
  960. #    Deny from all
  961. #    Allow from .your-domain.com
  962. #</Proxy>
  963.  
  964. #
  965. # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  966. # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  967. # Set to one of: Off | On | Full | Block
  968. #
  969. #ProxyVia On
  970.  
  971. #
  972. # To enable the cache as well, edit and uncomment the following lines:
  973. # (no cacheing without CacheRoot)
  974. #
  975. #CacheRoot "/usr/freeware/apache2/proxy"
  976. #CacheSize 5
  977. #CacheGcInterval 4
  978. #CacheMaxExpire 24
  979. #CacheLastModifiedFactor 0.1
  980. #CacheDefaultExpire 1
  981. #NoCache a-domain.com another-domain.edu joes.garage-sale.com
  982.  
  983. #</IfModule>
  984. # End of proxy directives.
  985.  
  986. #
  987. # Bring in additional module-specific configurations
  988. #
  989. <IfModule mod_ssl.c>
  990.     Include conf/ssl.conf
  991. </IfModule>
  992.  
  993.  
  994. ### Section 3: Virtual Hosts
  995. #
  996. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  997. # machine you can setup VirtualHost containers for them. Most configurations
  998. # use only name-based virtual hosts so the server doesn't need to worry about
  999. # IP addresses. This is indicated by the asterisks in the directives below.
  1000. #
  1001. # Please see the documentation at 
  1002. # <URL:http://httpd.apache.org/docs-2.0/vhosts/>
  1003. # for further details before you try to setup virtual hosts.
  1004. #
  1005. # You may use the command line option '-S' to verify your virtual host
  1006. # configuration.
  1007.  
  1008. #
  1009. # Use name-based virtual hosting.
  1010. #
  1011. #NameVirtualHost *
  1012.  
  1013. #
  1014. # VirtualHost example:
  1015. # Almost any Apache directive may go into a VirtualHost container.
  1016. # The first VirtualHost section is used for requests without a known
  1017. # server name.
  1018. #
  1019. #<VirtualHost *>
  1020. #    ServerAdmin webmaster@dummy-host.example.com
  1021. #    DocumentRoot /www/docs/dummy-host.example.com
  1022. #    ServerName dummy-host.example.com
  1023. #    ErrorLog logs/dummy-host.example.com-error_log
  1024. #    CustomLog logs/dummy-host.example.com-access_log common
  1025. #</VirtualHost>
  1026.